package no6;

/*
 * Person 可序列化需要实现Serializable
 * 需要当前类实现一个全局
 */
import java.io.Serializable;

public class Person implements Serializable {
	public static final long serialVersion = 42515645616L;
	
	private String name;
	
	private int age;
	
	Person() {}
	Person(String a, int b) {
		this.name = a;
		this.age = b;
	}
	
	public String toString() {
		return "Person = {name = " + name + ", age = " + age + "}";
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public void setAge(int a) {
		this.age = a;
	}
}

